package com.xiaoshuidi.cloud.module.rooms.api;

import com.xiaoshuidi.cloud.framework.common.pojo.CommonResult;
import com.xiaoshuidi.cloud.module.rooms.api.roomentrust.RoomEntrustApi;
import com.xiaoshuidi.cloud.module.rooms.service.RoomEntrustService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

import static com.xiaoshuidi.cloud.module.system.enums.ApiConstants.VERSION;

@Slf4j
@RestController
@DubboService(version = VERSION)
@Validated
@RequiredArgsConstructor
public class RoomEntrustApiImpl implements RoomEntrustApi {

    private final RoomEntrustService roomEntrustService;

    /**
     * 未完成的委托数量
     * @return
     */
    @Override
    public CommonResult<Long> toBeContinuedEntrustNum() {
        return roomEntrustService.toBeContinuedEntrustNum();
    }
}
